package com.yanchangapp.model.bean;

import java.io.Serializable;

/**
 * Created by apple on 2019/7/10.
 * description:
 */
public class MailUserBean implements Serializable {
    private String address;
    private String nickname;
    private String username;

    public MailUserBean(String address, String nickname, String username) {
        this.address = address;
        this.nickname = nickname;
        this.username = username;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj instanceof MailUserBean){
            MailUserBean mailUserBean = (MailUserBean)obj;
            return  address.equals(mailUserBean.getAddress()) && nickname.equals(mailUserBean.getNickname())
                    && username.equals(mailUserBean.getUsername());
        }
        return false;
    }

    @Override
    public int hashCode() {
        return address.hashCode()+nickname.hashCode()+username.hashCode();
    }
}
